package com.service.iter.sales;

import com.pojo.Product;
import com.pojo.requestjson.AddSalesProductDetailRequestJson;
import com.pojo.sales.view.SalesDetailR;
import com.util.Res;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 销售订单服务
 *
 * @author admin
 * @date 2023/06/20
 */
public interface ISaleOrderService {
    /**
     * 添加销售订单
     *
     * @return {@link Res}
     */
    Res AddSaleOrder(AddSalesProductDetailRequestJson products);

    /**
     * 得到销售详情
     *
     * @return {@link List}<{@link SalesDetailR}>
     */
    List<SalesDetailR> getSalesDetail();

    Product getProductPrice(Integer id, Integer sizeId);


    Res AddProductOrder(Long salesOrderId);

    Res updateStatus(Long salesOrderId);

    /**
     * 清空购物车
     *
     * @param consumerPhone 消费者电话
     * @return {@link Integer}
     */
    Res emptyShopCart(@Param("consumerPhone") String consumerPhone);
}
